<?php
 defined('RUN')or die('No access');class Validator{public static function isNumeric($a){return is_numeric($a);}public static function isString($a){return is_string($a);}public static function isEmail($a){return filter_var($a,FILTER_VALIDATE_EMAIL);}public static function isIp($a){return filter_var($a,FILTER_VALIDATE_IP);}public static function isUrl($a){return filter_var($a,FILTER_VALIDATE_URL);}public static function isLonger($a,$b,$c=FALSE){$d=($c?$a:String::toAnsi($a));return(strlen($d)>$b);}public static function isShorter($a,$b,$c=FALSE){$d=($c?$a:String::toAnsi($a));return(strlen($d)<$b);}public static function isEmpty($a){return(trim($a)==='');}public static function isAlpha($a){return preg_match('/^([A-Za-z_-])+$/i',$a);}public static function checkRequired($e,$f){foreach($f as $g){if(!array_key_exists($g,$e)||self::isEmpty($e[$g])){return FALSE;}}return TRUE;}}